package com.xiaohudie.Lambda;

import java.util.function.IntPredicate;

/**
 * @Author xiao hu die
 * @Date 2022/2/22 10:30
 * @Version 1.0
 */
public class Lambda03 {
 public static void main(String[] args) {
 printNum((int x)->{
  return  x%3==0;
 } );
 }
 public static void printNum(IntPredicate predicate){
  int[] arr ={1,2,3,4,5,6,7,8,9,10};
  for (int i : arr) {
   if (predicate.test(i)){
    System.out.println(i);
   }
  }
 }
}
